﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="dangthongbao.aspx.cs" Inherits="Admin_dangthongbao" %>

<%@ Register Assembly="CKFinder" Namespace="CKFinder" TagPrefix="CKFinder" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%--<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script src="<%=ResolveUrl("~/") %>Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/") %>ckfinder/ckfinder.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnChon").click(function () {
                var finder = new CKFinder();
                finder.selectActionFunction = function (fileUrl) {
                    $('#<%=txtUrl.ClientID %>').val(fileUrl);
                };
                finder.popup();
            });
        });
 
    </script>
    <div id="dangthongbao">
        <asp:Label ID="Label2" runat="server" Text="Ma TB"></asp:Label>
        <br />
        <asp:TextBox ID="TextBox1" runat="server" Width="200px"></asp:TextBox>
        <br />
        <asp:Label ID="Label3" runat="server" Text="Tieu De Thong Bao"></asp:Label>
        <br />
        <asp:TextBox ID="TextBox2" runat="server" Width="200px"></asp:TextBox>
        <br />
        <asp:Label ID="Label4" runat="server" Text="Noi Dung"></asp:Label>
        <br />
        <CKEditor:CKEditorControl ID="CKEditorControl1" runat="server" Height="400px"></CKEditor:CKEditorControl>
        <br />
        <%--<asp:TextBox ID="TextBox3" runat="server" Width="200px"></asp:TextBox>--%>
        <%--<asp:DropDownList ID="cmbMenu" runat="server" Width="400px">
        </asp:DropDownList>--%>
        <%--<p>  Hình minh họa cho bản tin</p>

                    <asp:FileUpload ID="FileUploadImage" runat="server" Width="522px" />
        --%>
        <asp:Label ID="Label5" runat="server" Text="Ma Nhan Vien"></asp:Label>
        <br />
        <asp:TextBox ID="TextBox4" runat="server" Width="200px"></asp:TextBox>
        <%-- <p>  Trích yếu</p> 
                <CE:Editor ID="EditorSumary" runat="server" AutoConfigure="Simple"
                    URLType="Default" Width="99%" EnableBrowserContextMenu="False" 
                    UsePhysicalFormattingTags="True" UseSimpleAmpersand="True" Height="200px">
                    <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderWidth="1px" BorderStyle="Solid" CssClass="CuteEditorFrame" Height="100%" Width="100%"></FrameStyle>
                </CE:Editor>
        --%>
        <br />
        <%--<asp:TextBox ID="txtUrl" runat="server" Width="344px"></asp:TextBox>
        <input type="button" id="btnChon" value="Chọn File ..." />--%>
        <%--<CE:Editor ID="EditorContent" runat="server" AutoConfigure="Compact" 
                    URLType="Default" Width="99%" EnableBrowserContextMenu="False" 
                    UsePhysicalFormattingTags="True" UseSimpleAmpersand="True" Height="300px">
                    <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderWidth="1px" BorderStyle="Solid" CssClass="CuteEditorFrame" Height="100%" Width="100%"></FrameStyle>
                </CE:Editor>--%>
        <br />
        <asp:TextBox ID="txtUrl" runat="server" Width="344px"></asp:TextBox>
            <input type="button" id="btnChon" value="Chọn File ..." />
        <%--<asp:FileUpload ID="FileUpload1" runat="server" />--%>
        <br />
        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
        <asp:Label ID="Label6" runat="server" Text=""></asp:Label>
        <asp:Button ID="butOK" runat="server" OnClick="butOK_Click" Text="Gửi thông báo" />
    </div>
    <div id="danhsach">
        <div id="xoa">
            <p>
                Danh Sach Thong Bao</p>
        </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
            OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCancelingEdit="GridView1_RowCancelingEdit"
            OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
            <RowStyle BackColor="White" ForeColor="#003399" />
            <Columns>
                <%--<asp:TemplateField HeaderText="Mã TB">
                            <ItemTemplate>
                                <asp:Label ID="lblTitle" runat="server" Font-Bold="True" 
                        Text='<%# Eval("MaTB") %>'></asp:Label>
                            </ItemTemplate>
                    </asp:TemplateField>--%>
                <asp:BoundField DataField="MaTB" HeaderText="Mã TB" ReadOnly="True">
                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                </asp:BoundField>
                <asp:BoundField DataField="TieuDe_TB" HeaderText="Tiêu Đề">
                    <ItemStyle Width="100px" />
                </asp:BoundField>
                <asp:BoundField DataField="NoiDung_TB" HeaderText="Nội Dung">
                    <ItemStyle HorizontalAlign="Center" Width="150px" />
                </asp:BoundField>
                <asp:BoundField DataField="NgayTB" HeaderText="Ngày">
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:BoundField>
                <asp:BoundField DataField="MaNV" HeaderText="Mã NV">
                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                </asp:BoundField>
                <asp:BoundField DataField="FlieKem" HeaderText="File Kem">
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:BoundField>
                <asp:CommandField CancelText="K Lưu" EditText="Sửa" ShowEditButton="True" UpdateText="Lưu" />
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Button ID="butXoa" runat="server" OnClick="butXoa_Click" Text="Xóa" OnClientClick="return (confirm('Bạn có muốn xóa không?'));" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkXoa" runat="server" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        </asp:GridView>
        <asp:Label ID="tbl" runat="server" Text=""></asp:Label>
    </div>
</asp:Content>
